import './assets/main.scss'

import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

//导入路由
import router from '@/router'

//导入 pinia 实现组件(页面)间互相传值
import { createPinia } from "pinia";



//导入 pinia 的持久化插件 persist
import { createPersistedState } from "pinia-persistedstate-plugin";

import App from './App.vue'
//分页插件汉化
import locale from 'element-plus/dist/locale/zh-cn.js'

const app =  createApp(App)

//实例pinia
const pinia = createPinia();

//创建一个 persist实例
const persist = createPersistedState()


app.use(router)
app.use(ElementPlus)
//使用pinia
app.use(pinia)

//让pinia使用 peersist 插件(持久化插件)
pinia.use(persist)
//最后在 pinia defineStore的实例 useTokenStore 里面加入  (同级最高)参数{persist:true}


//分页插件汉化
app.use(ElementPlus,{locale});


app.mount('#app')








// import './assets/main.scss'

// import { createApp } from 'vue'
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
// import router from '@/router'
// import App from './App.vue'
// import {createPinia} from 'pinia'
// import { createPersistedState } from 'pinia-persistedstate-plugin'
// import locale from 'element-plus/dist/locale/zh-cn.js'

// const app = createApp(App);
// const pinia = createPinia();
// const persist = createPersistedState();
// pinia.use(persist)
// app.use(pinia)
// app.use(router)
// app.use(ElementPlus,{locale});
// app.mount('#app')
